Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  


RE: DomParser AND serialize
~Bella Opponelyings 19.Dec.03 10:20 PM a Web browser
Domino Designer 6.5 All Platforms


Sub Initialize
Set session = New NotesSession
Set db = session.CurrentDatabase

Set stream = session.CreateStream
path$ = "c:\data\dxl\"
filename$ = "stream.dxl"
filename$ = path$ & filename$
If Not stream.Open(filename$, "UTF-8") Then
Messagebox "Cannot open " & filename$,, "Error"
Exit Sub
End If
Call stream.Truncate

Set stream2 = session.CreateStream
path$ = "c:\data\dxl\"
filename$ = "stream2.dxl"
filename$ = path$ & filename$
If Not stream2.Open(filename$, "UTF-8") Then
Messagebox "Cannot open " & filename$,, "Error"
Exit Sub
End If
Call stream2.Truncate

Dim dbCopy As NotesDatabase
Dim streamDXL As String
Dim docNode As NotesDOMDocumentNode

Set exporter = session.CreateDXLExporter
Call exporter.SetInput(db)
Call exporter.SetOutput(stream)
exporter.ConvertNotesBitmapsToGIF = True
Call exporter.Process
streamDXL = stream.readText(EOL_ANY)
Set domParser=session.CreateDOMParser(streamDXL, stream2)
domParser.AddXMLDeclNode = True
domParser.InputValidationOption = VALIDATE_NEVER
Call domParser.Process
Call domParser.Serialize( )

filename$ = Left(db.FileName, Len(db.FileName) - 4)
Set dbCopy = New NotesDatabase("", "")
Call dbCopy.Create("", filename$ & "Copy05", True)

Set importer = session.CreateDXLImporter
Call importer.SetInput( stream2)
Call importer.SetOutput(dbCopy)
importer.ReplaceDBProperties = True
importer.ReplicaRequiredForReplaceOrUpdate = False
importer.ACLImportOption = DXLIMPORTOPTION_REPLACE_ELSE_IGNORE
importer.DesignImportOption = DXLIMPORTOPTION_REPLACE_ELSE_CREATE
Call importer.Process

End Sub




DomParser AND serialize (~Bella Opponely... 19.Dec.03)
. . RE: DomParser AND serialize (~Bella Opponely... 19.Dec.03)
. . dxl -> dom -> serialize() -> dxl (~Bella Opponely... 19.Dec.03)
. . RE: DomParser AND serialize (~Kirk Elreterod... 20.Dec.03)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS